package source.model.technology;

import source.model.*;
import source.view.*;

public class UpgradeUnitOffensiveDamage extends UnitTechnology {

	private int amount;
	
	public UpgradeUnitOffensiveDamage(){
		this(1);
	}
	
	public UpgradeUnitOffensiveDamage(int amount){
		this(amount, (int)(Math.random()*100));
	}
	
	public UpgradeUnitOffensiveDamage(int amount, int research){
		this.amount=amount;
		setResearchTillDone(research);
	}
	
	public void teach(Player p) {
		p.modODBonus(amount);
		MainScreen.writeToConsole("You have aquired a + " + amount + " to Offensive Damage!");
	}
	
	public void research(int amount){
		decrementResearchTillDone(amount);
	}
	
	public String toString(){
		return "Offensive Unit Offensive Damage Upgrade";
	}
}
